<?php

class Solution
{

    /**
     * @param Integer[] $nums
     * @return Integer
     */
    function missingNumber($nums)
    {
        $count = count($nums);

        $full = range(0, $count);

        return array_values(array_diff($full, $nums))[0];
    }
}
